<%@ page import="com.tlb.ejb.*,com.tlb.dto.*,com.tlb.web.*,java.util.*" %>

<%



int postId = Integer.parseInt(request.getParameter("replyPostId"));
int threadId = Integer.parseInt(request.getParameter("threadId"));
int treeId = Integer.parseInt(request.getParameter("treeId"));
int monikerId = Integer.parseInt(request.getParameter("monikerId"));
int x = Integer.parseInt(request.getParameter("x")) + 1;


String content = request.getParameter("content");
Boolean nsfw = new Boolean(request.getParameter("nsfw"));


Poster p = new AuthManager(request, response).hardAuthenticatePoster(monikerId);



ThreadDAO tdao = new ThreadDAO();
PostView pv = new PostView();
pv.setContent(content);
pv.setMonikerId(monikerId);
pv.setThreadId(threadId);
pv.setTreeId(treeId);
pv.setPostId(postId);
pv.setNsfw(nsfw);

tdao.addReply(pv);


response.setStatus(response.SC_MOVED_TEMPORARILY);
response.setHeader("Location", "http://" + Util.getUtil().getServerRoot(request) + "/blb/viewThread.jsp?threadId=" + threadId + "&x=" + x);
    






%>

